With the rapid development of the Internet and smart devices, a barcode is used as an agile and convenient information communicating medium which people use in their daily lives. A barcode includes a one-dimensional barcode, a two-dimensional barcode, a color barcode, etc.
Nowadays, many merchants introduce functions that use the barcode to implement payment, login, etc., which are very convenient for users. In fact, the above functions are realized based on an authentication process of barcode. For example, in a situation where a user uses a terminal, such as a personal computer (PC), to generate a barcode for a login operation, and a terminal, such as a cell phone, is then used to take a photo of the generated barcode and then send stored account information to a server where an authentication is performed in connection to the login operation. If the authentication is successful, the server will return a message of successful authentication to the terminal and the terminal then performs login operation based on the account information.
However, as most barcodes cannot be recognized by human's eyes, in the authentication process based on the barcode as above, hackers may be able to take advantage of the users by luring the users to take photos of the barcode so as to steal data or resources from the users, thereby resulting in lower security. For example, a hacker may place the barcode corresponding to the login operation on a fake webpage or send the barcode to the users via a communication tool in a batch with words that lure the users to take the photos of the barcodes. After the user takes photo of the barcode and use the barcode for login operation, the user's relevant information is stolen by the hacker.
For example, a hacker may order an item from an e-commerce website and a barcode is generated for payment of such item. The hacker, however, does not pay for the item via the barcode. Instead, the hacker places the barcode on some other webpage and falsely links the barcode to some other item. For instance, the hacker may misguide the user by linking the barcode to another item that the hacker is selling online. When the user scans the barcode and pays via the barcode, the user actually pays the item for the hacker. The hacker thus steals money from the user.